<template>
  <div class="poster">
    <image src="/static/images/common/defaultUserHead.png" mode="scaleToFill" />
    <div class="title">餐饮信息网</div>
    <div class="box">
      <div class="loading2">
        <i class="dian" v-for="(item, index) in 3" :key="item" :class="[active <= index ? 'activedStyle' : '']"></i>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "poster",
  data() {
    return {
      timer: null,
      active: 0,
    };
  },
  created() {},
  mounted() {
    this.timer = setInterval(() => {
      this.active = this.active + 1;
      if (this.active == 4) {
        this.active = 0;
      }
    }, 100);
  },
  computed: {},
  onLoad(options) {
	
    if (options.shareUserId) {
      this.$setStoraged("shareUserId", JSON.parse(options.shareUserId));
    }
    setTimeout(() => {
      clearInterval(this.timer);
      this.$redirectTo("/pagesHome/index");
    }, 1000);
  },
};
</script>

<style lang="scss" scoped>
.poster {
  image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 200px auto 10px;
    display: block;
  }
  .title {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
  }
  .box {
    margin: 0 auto;
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    opacity: 0.8;
    position: absolute;
    .loading2 {
      width: auto;
      height: 100%;
      .dian {
        display: inline-block;
        margin-right: 5px;
        width: 4px;
        height: 4px;
        background: rgb(2, 2, 2);
        border-radius: 50%;
        transition: 0.3s linear;
      }
      .activedStyle {
        background: #999;
      }
    }
  }
}
</style>
